<%@ page contentType="text/html; charset=GBK" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"  %>
<%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<HTML>
<HEAD>
<TITLE><bean:message bundle='webEditor'  key='webEditor.InsertMedia.Title' /></TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
body, a, table, div, span, td, th, input, select{font:9pt;font-family: Verdana, Arial, Helvetica, sans-serif;}
body {padding:5px}
</style>

<script language="JavaScript" src="dialog.js"></script>

<script language="JavaScript">

function ReturnValue(){
	var sFromUrl = d_fromurl.value;
	var sWidth = d_width.value;
	var sHeight = d_height.value;

	var sHTML = '<EMBED src="' + sFromUrl + '" width="' + sWidth + '" height="' + sHeight + '" type="audio/x-pn-realaudio-plugin" autostart="true" controls="IMAGEWINDOW,ControlPanel,StatusBar" console="Clip1"></EMBED>';
	dialogArguments.insertHTML(sHTML);

	window.returnValue = null;
	window.close();
}


function ok(){

	d_width.value=ToInt(d_width.value);
	d_height.value=ToInt(d_height.value);
	ReturnValue();

}

function DisableItems(){
	d_fromurl.disabled=true;
	d_width.disabled=true;
	d_height.disabled=true;
	Ok.disabled=true;
}

function AbleItems(){
	d_fromurl.disabled=false;
	d_width.disabled=false;
	d_height.disabled=false;
	Ok.disabled=false;
}

function UploadImport(){
   var dEL = document.all("d_fromurl");
    var url = "<html:rewrite page='/protected/resmgr/initDirectory.do' />?CallFromTemplateDesign=true";
	var arr = showModalDialog(url,window,"dialogWidth:750px;dialogHeight:600px;help:no;scroll:yes;status:no");
	if (arr) {
		dEL.value=arr;
	}
}
</script>
</HEAD>

<BODY bgColor=menu>

<table border=0 cellpadding=0 cellspacing=0 align=center>
<tr>
	<td>
	<fieldset>
	<legend><bean:message bundle="webEditor"  key="webEditor.InsertMedia.Source" /></legend>
	<table border=0 cellpadding=0 cellspacing=0>
	<tr><td colspan=9 height=5></td></tr>
	<tr>
		<td width=7></td>
 		<td colspan=5><input type=text id="d_fromurl" style="width:220px" size=25 value="" ></td>
		<td width=5></td>
		<td width=7><input type=button value="<bean:message bundle='webEditor'  key='webEditor.InsertImage.Upload' />" onclick="UploadImport()"></td>
		<td width=5></td>
		<td width=5><input type=submit value="<bean:message bundle='webEditor'  key='webEditor.InsertImage.Import' />" onclick="UploadImport()"></td>
	</tr>
	<tr><td colspan=9 height=5></td></tr>
	</table>
	</fieldset>
	</td>
</tr>
<tr><td height=5></td></tr>
<tr>
	<td>
	<fieldset>
	<legend><bean:message bundle="webEditor"  key="webEditor.InsertMedia.Effect" /></legend>
	<table border=0 cellpadding=0 cellspacing=0>
	<tr><td colspan=9 height=5></td></tr>
	<tr>
		<td width=7></td>
		<td noWrap><bean:message bundle="webEditor"  key="webEditor.InsertMedia.Width" /></td>
		<td width=5></td>
		<td><input type=text id=d_width size=10 value="200" ONKEYPRESS="event.returnValue=IsDigit();" maxlength=4></td>
		<td width=40></td>
		<td noWrap><bean:message bundle="webEditor"  key="webEditor.InsertMedia.Height" /></td>
		<td width=5></td>
		<td><input type=text id=d_height size=10 value="200" ONKEYPRESS="event.returnValue=IsDigit();" maxlength=4></td>
		<td width=7></td>
	</tr>
	<tr><td colspan=9 height=5></td></tr>
	</table>
	</fieldset>
	</td>
</tr>
<tr><td height=5></td></tr>
<tr><td align=right><input type=submit value="<bean:message bundle='webEditor'  key='webEditor.Confirm' />" id=Ok onclick="ok()">&nbsp;&nbsp;<input type=button value="<bean:message bundle='webEditor' key='webEditor.Cancel' />" onclick="window.close();"></td></tr>
</table>

</body>
</html>
